#!/bin/bash
yum -y install ntpdate&>/dev/null
#修改时区
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
while read line
do
    echo "ZONE=Asia/Shanghai"
    echo "UTC=false"
    echo "ARC=false"
done </etc/sysconfig/clock
#同步中国ntp服务器时间
ntpdate -u cn.pool.ntp.org